package light.head.framework.entity;

import java.lang.reflect.Field;
import java.util.Comparator;

/**
 * @author janhang
 * @2012-5-21 下午09:43:35
 */
@SuppressWarnings("rawtypes")
public class ExcelFieldComparator implements Comparator {
	public int compare(Object f1, Object f2) {
        ExcelField ef1 = ((Field)f1).getAnnotation(ExcelField.class);
        ExcelField ef2 = ((Field)f2).getAnnotation(ExcelField.class);
		return ef1.order() - ef2.order();
	}
}
